/**
 * Created by Dalyn on 2017/3/14.
 */
import Relay from "react-relay";

export default class GetEnAccountRecordListMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getEnAccountRecordList }`;
    }

    getVariables() {
        return {
            argsInput: {
                inOrOut:this.props.inOrOut,
                enid: this.props.enid,
                tranNo:this.props.tranNo,
                enterpriseName:this.props.enterpriseName,
                pageNum: this.props.pageNum,
                pageSize: this.props.pageSize,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getEnAccountRecordListPayload {
            data {
                errorCode
                value
                totalResult
                id
                cashMoney
                enAccountRecordList{
                    enterpriseName
                    tranNo
                    enid
                    sourceName
                    inOrOut
                    orderId
                    createTime
                    amount
                    createBy
                    accountRecordId
                    sourceCode
                    applyStatus
                    remitFileJson
                    applyAmount
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on getEnAccountRecordListPayload {
                    data {
                        errorCode
                        value
                        totalResult
                        id
                        cashMoney
                        enAccountRecordList{
                            enterpriseName
                            tranNo
                            enid
                            sourceName
                            inOrOut
                            orderId
                            createTime
                            amount
                            createBy
                            accountRecordId
                            sourceCode
                            applyStatus
                            remitFileJson
                            applyAmount
                        }

                    }
                }
            `]
        }];
    }

}
